<template>
  <div style="user-select: none">
    请选择你喜欢的专栏
    <br />
    <br />
    <span v-for="(item, index) in arr" :key="index">
      <!-- v-model 处理非 Boolean 的值时可以配合 value 去使用 -->
      <input
        type="checkbox"
        v-model="newArr"
        :value="item"
        :id="`ck${index}`"
      /><label :for="`ck${index}`">{{ item }}</label>
    </span>
    <ul>
      <li v-for="(item, index) in newArr" :key="index">
        {{ item }}
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'Xzxhd',
  components: {},
  data() {
    return {
      arr: ['科幻', '喜剧', '动漫', '冒险', '科技', '军事', '娱乐', '奇闻'],
      newArr: [],
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {},
}
</script>
